package com.example.servicetest

import android.content.Context
import android.content.Intent

class GenericTypeDemo

inline fun <reified T> getGenericType() = T::class.java


inline fun <reified T> startActivity(context: Context) {
    val intent = Intent(context, T::class.java)
    context.startActivity(intent)
}

inline fun <reified T> startActivity(context: Context,block: Intent.() -> Unit){
    val intent = Intent(context, T::class.java)
    intent.block()
    context.startActivity(intent)
}

//fun main() {
//    println(getGenericType<String>())
//}